import * as types from './type';


export const handleAccount = (value) => ({
    type: types.LOGIN_INPUT_ACCOUNT,
    value
})

export const handlePassword = (value) => ({
    type: types.LOGIN_INPUT_PASSWORD,
    value
})

export const handleSignAccount = (value) => ({
    type: types.SIGN_INPUT_ACCOUNT,
    value
})
export const handleSignPassword = (value) => ({
    type: types.SIGN_INPUT_PASSWORD,
    value
})
export const handleSignSurePassword = (value) => ({
    type: types.SIGN_INPUT_SURE_PASSWORD,
    value
})
export const handleSignPhone = (value) => ({
    type: types.SIGN_INPUT_PHONE,
    value
})
export const handleSignEmail = (value) => ({
    type: types.SIGN_INPUT_EMAIL,
    value
})
export const handleSignSMSCode = (value) => ({
    type: types.SIGN_INPUT_SMS_CODE,
    value
})
export const handleSignMailCode = (value) => ({
    type: types.SIGN_INPUT_MAIL_CODE,
    value
})

// export const toSign  = (user)=>{
//     return (dispatch)=>{
//         try{
//             Http.post('/sys/create/account',user).then((res)=>{
//                 if (res.success){
//                     successMsg(res.message)
//                 }else{
//                     errorMsg(res.message)
//                 }
//             }).catch( e => errorMsg( e ))
//         }catch (e) {
//
//         }
//     }
// }
// export const toLogin = (user) => {
//     return (dispatch) => dispatch(InitUser(user))
// }
